module ::Wondercap
module Deployment
module NameFilters
    
  class TaskFilter
    def apply(names, base_config)
      task_sym = base_config.fetch(:task).to_sym
      names.delete_if do |name|
        !base_config.mc.find_configuration(name).find_task(task_sym)
      end
    end
  end
    
end
end
end

define_name_filter :task, Wondercap::Deployment::NameFilters::TaskFilter
